<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
  <head>
    <meta charset="UTF-8" />
    <title>综合</title>
    <link rel="stylesheet" href="../../static/css/publishBlog.css" th:href="@{/static/css/publishBlog.css}">
    <link rel="stylesheet" th:href="@{/static/css/replymask.css}" />
    <link rel="stylesheet" th:href="@{/static/css/home.css}" />
<!--    <link rel="stylesheet" th:href="@{/static/css/unlogin-list.css}" />-->
    <link rel="stylesheet" th:href="@{/static/css/common.css}" />
    <link rel="stylesheet" href="../../static/customAlertConfirm/customAlertConfirm.css" th:href="@{/static/customAlertConfirm/customAlertConfirm.css}" />
    <link rel="stylesheet" th:href="@{/static/css/iconfont01.css}" />
  </head>
  <body>
    <div th:replace="~{unlogin :: mask }"></div>
    <div th:replace="~{home::more-reply-mask}"></div>
    <div th:replace="~{home::publishBlogBox}"></div>
    <div th:replace="~{home::tip-off}"></div>
    <div th:replace="~{hot::#model}"></div>
    <div class="top">
      <div id="top">
        <!-- logo -->
        <div id="logo-search">
          <div class="logo">
            <img
              src="../../static/img/logo.png"
              th:src="@{/static/img/logo.jpg}"
              alt=""
            />
          </div>
          <div class="top-search" th:replace="~{home::topSearch}">
            <span><i class="iconfont">&#xe623;</i></span>
            <input type="text" placeholder="请输入搜索内容" id="top-input" />
          </div>
        </div>

        <!-- 各种功能 -->
        <div id="fn" th:fragment="searchFn">
          <div class="home fn">
            <a
              class="icon"
              href="home.html"
              th:href="@{/blog/getIndexBlog(state=2)}"
              ><i class="iconfont">&#xe625;</i></a
            >
          </div>
          <div class="hot fn">
            <a
              class="icon"
              href="hot.html"
              th:href="@{/blog/getIndexBlog(state=2)}"
              ><i class="iconfont">&#xe628;</i></a
            >
          </div>
          <div class="message fn">
            <a
              class="icon"
              href="message.html"
              th:href="@{/user/getOthersCommentOfMe}"
              ><i class="iconfont">&#xe908;</i></a
            >
          </div>
          <div class="private fn">
            <a
              class="icon"
              href="personalPage.html"
              th:href="@{/my/toMyInfo}"
              ><i class="iconfont">&#xe60a;</i></a
            >
          </div>
        </div>
        <!-- 登录，设置等-->
        <div class="access" th:replace="~{home::access}">
          <div class="setting">
            <button class="top-setting-btn">
              <i class="iconfont">&#xe645; </i>
            </button>
            <div class="setting-list">
              <a th:href="@{/my/toMyInfo}" style="color: black">
                个人中心</a
              >
              <a th:href="@{/my/echoMyMessage}">账号修改</a>
              <a th:href="@{/my/logout}">退出</a>
            </div>
          </div>

          <div class="setting">
            <button class="top-pattern-btn">
              <i class="iconfont">&#xe6d9;</i>
            </button>
          </div>
          <div class="setting">
            <button class="top-publish-btn">
              <i class="iconfont">&#xe61d; </i>
            </button>
          </div>
        </div>
      </div>
    </div>
    <div id="content">
      <div class="list">
        <p>搜索</p>
        <ul>
          <div class="comprehensive">
            <a class="color" th:href="@{/blog/skipToBlog(label=${label})}">
              <span><i class="iconfont">&#xe655;</i></span>
              综合
            </a>
          </div>
          <div class="serachUser">
            <a th:href="@{/blog/skipToAllUser}" >
              <span><i class="iconfont">&#xe634;</i></span>
              用户
            </a>
          </div>
        </ul>
      </div>
      <div id="news">
        <div class="allnews">
          <div
                  class="news"
                  th:each="article:${list}"
                  th:bid="${article.id}"
                  th:uid="${article.uid}"
          >
            <div class="news-top">
              <a th:href="@{/weibo/user/toOnesInfo(id=${article.uid})}" class="head-link">
                <div class="head">
                  <img
                          src="../../static/img/banner.jpg"
                          th:src="${article.userAvatarUrl}"
                          alt=""
                  />
                </div>
              </a>
              <div class="top-details">
                <a href="" class="name" th:href="@{/user/toOnesInfo(id=${article.uid})}">
                  <p th:text="${article.username}">XXX</p>
                </a>
                <p class="time" th:text="${article.time}">3-18</p>
              </div>
              <div class="top-attention">
                <button class="top-attention-btn">
                  <i class="iconfont">&#xe7df;</i>关注
                </button>
              </div>
              <div class="report-remove">
                <div
                        class="rm-icon"
                        th:bid="${article.id}"
                        th:otherid="${article.uid}"
                        onclick="reportfn(this)"
                >
                  <i class="iconfont">&#xe62e;</i>
                </div>
                <ul class="rm-detials hidden">
                  <li class="tip-off-li" th:bid="${article.id}" onclick="tipOffFn(this)">投诉</li>
                  <li class="remove-li" th:bid="${article.id}" onclick="removeBlog(this)">删除</li>
                </ul>
              </div>
            </div>
            <div class="news-container">
              <div class="container">
                <a class="color" th:if="${article.label}!=null" th:href="@{/blog/skipToBlog(label=${article.label})}" th:text="'#'+${article.label}+'#'"></a>&nbsp;&nbsp;<span class="container-text" th:text="${article.text}"></span>

                <span class="collapse more">...展开</span>
              </div>

              <div class="news-content">
                <div
                        class="news-content-img"
                        th:each="img:${article.pictureUrl}"
                >
                  <img
                          th:src="@{${img}}"
                          src="../../static/img/logo.jpg"
                          alt=""
                          onclick="showModel(this)"
                  />
                </div>
              </div>
            </div>

            <!-- 底部博文功能 -->
            <div class="foot">
              <div class="share">
                <i class="iconfont">&#xe62f;</i>
                <span
                        th:text="${article.transmit}&gt;0?${article.transmit}:'分享'"
                >12</span
                >
              </div>
              <div class="assess" th:bid="${article.id}">
                <i class="iconfont">&#xe695;</i>
                <span th:text="评论">12</span>
              </div>
              <div class="like">
                <i class="iconfont">&#xe62b;</i>
                <span th:text="${article.likes}&gt;0?${article.likes}:'点赞'"
                >12</span
                >
              </div>
            </div>
            <!-- 点击评论展开评论信息 -->
            <div class="spread">
            <textarea
                    placeholder="请发布你的评论"
                    class="comment-text"
            ></textarea>
              <span class="comment-ddl">还可输入140字</span>
              <button class="comment-btn disable">评论</button>
              <!-- 评论 -->
              <div class="comment">
                <!-- 一级评论 -->
                <div class="item1">
                  <div class="comment-list">
                    <a href="">
                      <div class="comment-head">
                        <img
                                src="../../static/img/banner.jpg"
                                th:src="@{/static/img/banner.jpg}"
                                alt=""
                        />
                      </div>
                    </a>
                    <div class="comment-details">
                      <a href="" class="comment-name"> <span>XXX</span> </a>:
                      <span class="c-content">今天天气真好1</span>
                      <div class="comment-bottom">
                        <div class="c-time">3-18</div>
                        <div class="comment-fn">
                          <div class="c-complain">
                            <i class="iconfont">&#xe6a9;</i>
                          </div>
                          <div class="reply">
                            <i class="iconfont">&#xe695;</i>
                          </div>
                          <div class="c-like">
                            <i class="iconfont">&#xe600;</i>
                            12
                          </div>
                        </div>
                      </div>
                    </div>
                  </div>
                  <!-- 二级评论 -->
                  <div class="list2">
                    <div class="list2-bar"></div>
                    <div class="list2-details">
                      <a href="" class="list2-name"><span>XXX:</span></a>
                      <span class="list2-content">1111111111</span>
                    </div>
                    <div class="list2-bottom">
                      <div class="list2-time">3-18</div>
                    </div>
                  </div>

                  <div class="list2">
                    <a class="more-reply"
                    >共2条回复
                      <i class="iconfont">&#xe62e;</i>
                    </a>
                  </div>
                </div>
                <!-- 二级评论 -->
              </div>
              <div class="blog-skip" >
                <a th:href="@{/blog/skipInEnvelope(id=${attention.id})}">查看全部评论 ></a>
              </div>
            </div>

          </div>
        </div>

        <p class="none hidden">暂时没有更多内容了</p>
      </div>
      <div id="right-bar" th:replace="~{home::#right-bar}">
        <div id="hot">
          <div class="hot-top">
            <div class="hot-top-content"><p>热搜</p></div>
            <div class="refresh"><i class="iconfont">&#xe661;</i>点击刷新</div>
          </div>
          <div class="hot-list" th:each="hot,list:${hotSearchBlog}">
            <span class="rank1" th:class="|rank${list.count}|">1</span
            ><a>222222222222</a>
          </div>
          <a href="" class="all-hot"><div>查看完整榜单</div></a>
        </div>
        <a class="return-top" href="#">
          <i class="iconfont">&#xea7d;</i>
        </a>
      </div>
    </div>
  </body>
  <script
    src="../../static/js/jquery3.7.1.min.js"
    type="text/javascript"
    th:src="@{/static/js/jquery3.7.1.min.js}"
  ></script>
  <script
          type="text/javascript"
          src="../../static/customAlertConfirm/customAlertConfirm.js"
          th:src="@{/static/customAlertConfirm/customAlertConfirm.js}"
  ></script>
  <script
          type="text/javascript"
          src="../../static/js/personalPage-publish.js"
          th:src="@{/static/js/personalPage-publish.js}"
  ></script>
  <script
          type="text/javascript"
          src="../../static/js/more.js"
          th:src="@{/static/js/more.js}"
  ></script>
  <script th:src="@{/static/js/replymask.js}" type="text/javascript"></script>

  <script type="text/javascript" th:src="@{/static/js/common.js}"></script>

  <script type="text/javascript" th:src="@{/static/js/loadingSearch.js}"></script>
  <script th:inline="javascript">
    let alnews=document.getElementsByClassName("news");

    if(alnews.length==0){
      document.querySelector("#news").innerHTML=`<div class="news empty">暂无数据</div>`
    }
  </script>
</html>
